package com.tueye.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.IAdsiteDao;
import com.tueye.entity.Adsite;
import com.tueye.service.IAdsiteService;
import com.tueye.service.exception.TuEyeServiceException;

@Scope("prototype")
@Component("adsiteService")
public class AdsiteServiceImpl extends BaseService implements IAdsiteService{
	
	@Autowired
	@Qualifier("adsiteDao")
	private IAdsiteDao adsiteDao;
	
	@Override
	public Page pagedQueryByHQL(String hql, int pageNo, int pageSize,
			Object... values)throws TuEyeServiceException {
		return adsiteDao.pagedQueryByHQL(hql, pageNo, pageSize, values);
	}
	@Override
	public void addAdsite(Adsite adsite) throws TuEyeServiceException {
		adsiteDao.addAdsite(adsite);
	}
	@Override
	public void delAdsite(String id) throws TuEyeServiceException {
		adsiteDao.delAdsite(id);
		
	}
	@Override
	public Adsite getAdsiteById(String id) throws TuEyeServiceException{
		return adsiteDao.getAdsiteById(id);
	}

}
